import { createRouter, createWebHistory } from "vue-router";
import { setupPermission } from "./permission";

const router = createRouter({
  history: createWebHistory(),
  routes: [
    {
      path: "/",
      redirect: "/home",
    },
    {
      path: "/home",
      meta: { title: "Home" },
      component: () => import("@/views/home/index.vue"),
    },
    {
      path: "/pageB",
      meta: { title: "pageB" },
      component: () => import("@/views/pageB/index.vue"),
    },
  ],
});

setupPermission(router);
export default router;
